package com.lqm.service.home.impl;

import com.lqm.dao.HomeUserDao;
import com.lqm.entity.home.HomeUser;
import com.lqm.service.home.RechargeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;

@Service
@Transactional
public class RechargeServiceImpl implements RechargeService {

    @Autowired
    HomeUserDao homeUserDao;

    @Override
    public boolean recharge(Double money, HomeUser user) {

        Integer integer = homeUserDao.recharge(user, money);
        return integer>0?true:false;
    }
}
